package com.xxkj.drugtraceability.ui.drugoutscan

import com.xxkj.drugtraceability.base.BaseRepository
import com.xxkj.drugtraceability.bean.BaseData
import com.xxkj.drugtraceability.bean.DrugInStorageBean
import com.xxkj.drugtraceability.net.Result
import com.xxkj.drugtraceability.net.WanService

/**
 * author: zhoujingjin
 * created on: 2024/9/10 18:58
 * description:
 */
class DrugOutScanRepository(private val wanService: WanService):BaseRepository() {

    suspend fun drugOutStorage( data:String): Result<Any> {
        return safeApiCall { executeResponse(
                wanService.finishDrugOutDepot(data))
        }
    }
    /**
     * 扫放心码
     */
    suspend fun queryTracCodeByBoxCode( data:String): Result<BaseData<List<String>>> {
        return safeApiCall { executeResponse(wanService.queryTracCodeByBoxCode(data)) }
    }
    /**
     * 是否对接扫码放心码
     */
    suspend fun isOpenMsfx(): Result<BaseData<Boolean>> {
        return safeApiCall { executeResponse(wanService.isOpenMsfx()) }
    }
}